class Deck < ActiveRecord::Base
	has_many :cards, :dependent => :destroy
	attr_accessible :name, :cards_attributes
	validates :name, :presence =>  true
	accepts_nested_attributes_for :cards, :reject_if => lambda {|e| e[:text].blank? }, :allow_destroy => true
end
